from rest_framework import serializers

from common.common_base_model_serializer import BaseModelSerializer, NestedJSONField
from .models import *


class EnvInfoModelSerializer(BaseModelSerializer):
    class Meta:
        model = EnvInfo
        fields = '__all__'


class EnvParamsModelSerializer(BaseModelSerializer):
    value = NestedJSONField()

    class Meta:
        model = EnvParams
        fields = '__all__'


class DBConnectionModelSerializer(BaseModelSerializer):
    class Meta:
        model = DBConnection
        fields = '__all__'
